package com.itheima.service;


import com.itheima.entity.PageResult;
import com.itheima.entity.QueryPageBean;
import com.itheima.pojo.User;

public interface UserService {
    //根据用户名进行权限设置
    User findByUsername(String username);

    //用户名数据回显
    User findUsername(String name);

    //查询所有用户
    PageResult queryUserByPage(QueryPageBean queryPageBean);

    //添加用户
    void addUser(User user, Integer[] permissionIds, Integer[] roleIds);

    //编辑回显(角色)
    Integer[] queryRoleIdsByUserId(Integer userId);

    //编辑回显(权限)
    Integer[] queryPermissionIdsByRoleId(Integer userId);

    //更新用户
    void updateUsers(User user, Integer[] permissionIds, Integer[] roleIds);

    //删除用户
    void deleteUserById(Integer id);
}
